<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>油卡充值</title>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<!-- weui加载 -->
<link rel="stylesheet" href="${base}/static/css/recharge.css">
<script src="${base}/static/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="${base }/static/js/layer/layer.js"></script>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>预存申请</title>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<!-- weui加载 -->
<link rel="stylesheet" href="${base}/static/css/recharge.css">
<script src="${base}/static/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="${base }/static/js/layer/layer.js"></script>
<style>
.gastype{width: 44%;float:left;border: 1px solid #E8E6E6;height: 38px;text-align: center;font-size: 16px;line-height: 38px;color: #333333;border-radius: 5px;background: #fff;}
.gasselected{border: 1px solid #65BB0A;color: #fff;background: #65BB0A;}
.head-back{float: left;margin-left:3%; }
.head-title{width: 100px;height: 38px; margin: 0 auto;font-family:'黑体';font-size: 16px;}
</style>
</head>
<body ontouchstart class="weui-wepay-pay-wrap">


<div class="body fui-page"  style="overflow: auto">

    <div class="center">
		<div class="lbtu">
	        <img src="${base}/static/img/20180419.jpg">
	    </div>
    	<form id="recard_form">
	    <div class="main">
	        <div class="blk5" style="border-bottom: 0 !important;" id="gas_card_first">
	          <span>
	          	<input type="text" class="recharge" name='name' value="" placeholder="请输入姓名" />
	            <input type="number" class="recharge" name='telephone' value="" placeholder="请输入手机号" />
	            <div style="width: 100%;margin-top: 10px;margin-bottom:10px;text-align: left;font-size: 13px;">
	            	<p style="width: 100%;"><b>支付类型：</b></p>
	            	<p style="width: 100%;"><b>1.支付宝线下转账:</b> </P>
	            	<p style="width: 100%;padding-left: 10px;">支付账户：994882128@qq.com</p>
	            	<p style="width: 100%;"><b>2.对公转账:</b></p>
	            	<p style="width: 100%;padding-left: 10px;">
	            		户名：中翰云互联网科技有限责任公司<br>
						账号：4000031519200615116<br>
						开户行：中国工商银行深圳丽景支行
	            	</p>
	            </div>	
	            <!-- <div style="width: 100%;text-align: center;color: red;" id="gastype_prompt">支付账户：994882128@qq.com</div> -->            
	          </span>
	        </div>
	    </div>
	    </form>
		<div style="margin: 15px" style="position:fixed;bottom: 10px;">
			<p style="width: 100%;text-align: left;">提交申请后工作人员会与您联系</p>
	    	<input onclick="addBuy()" id="gas_next_button" style="position:fixed;bottom: 10px;" type="button" class="order" value="提交申请"/>
		</div>
		
		<div class="pay" id="jump" style="position: fixed;bottom: 0;">

		</div>
    </div>

</div>
<script type="text/javascript">
	function addBuycard(){
		var name  = $("input[name=name]").val();
		var telephone = $("input[name=telephone]").val();
		var isCheck = true;
		if(name==''){
			layer.msg('姓名不能为空');
		}
		//检测手机号
		var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(17[0]{1})|(15[0-3]{1})|(15[5-9]{1})|(18[0-9]{1}))+\d{8})$/;         
		if(telephone == ''||telephone.length !=11||!myreg.test(telephone)){  
			layer.msg('请输入正确的手机号码');
			isCheck = false;
			return false;
		}
		if(isCheck==true){
			$.ajax({
				url:"/addApplyBuyCard",
				type:'post',
				dataType:'json',
				data:{"name":name,"telephone":telephone},
				success:function(res){
					var code = res.code;
					if(code != '1'){
						layer.msg(res.msg);
					}else {
						layer.msg(res.msg);
						$("input[name=name]").val('');
						$("input[name=telephone]").val('');
					}
					
				}
			});
		}
		return false;
	}
</script>
</body>
</html>